package com.cloudlead.common.worker.security;

import com.cloudlead.common.lang.security.Subject;

import java.io.Serializable;

public class ScAuth implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 9172017221888027314L;

    private String accessToken;

    private int expiresIn;

    private Subject subject;

    public ScAuth(String accessToken) {
        super();
        this.accessToken = accessToken;
        this.expiresIn = 3600;
    }

    public ScAuth(String accessToken, int expiresIn) {
        super();
        this.accessToken = accessToken;
        this.expiresIn = expiresIn;
    }

    public ScAuth(String accessToken, int expiresIn, Subject subject) {
        this.accessToken = accessToken;
        this.expiresIn = expiresIn;
        this.subject = subject;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public int getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(int expiresIn) {
        this.expiresIn = expiresIn;
    }

    public Subject getSubject() {
        return subject;
    }

    public void setSubject(Subject subject) {
        this.subject = subject;
    }
}
